import Random from "./Random"

const RAND_CHARS = 'abcdefghjkmnpqrstuvwxyz23456789ABCDEFGHJKMNPQRSTUVWXYZ'
const RAND_LOWERCASE_LETTERS = 'abcdefghjkmnpqrstuvwxyz'


export default class Util {
    public static randChars(len: number): string {
        let chars = ''
        for (let i = 0; i < len; i++) {
            chars += RAND_CHARS[Random.range(0, RAND_CHARS.length - 1)]
        }
        return chars
    }

    public static randLowercaseLetters(len: number): string {
        let chars = ''
        for (let i = 0; i < len; i++) {
            chars += RAND_LOWERCASE_LETTERS[Random.range(0, RAND_LOWERCASE_LETTERS.length - 1)]
        }
        return chars
    }
}
